//
// Created by qiangqiangj on 2019/10/12.
//

#ifndef URL_H
#define URL_H

#define URL_VERSION "0.0.0"

struct URL {
    char *protocol;
    char *host;
    int port;
    char *path;
    int has_port;
};

extern struct URL *url_new();
extern struct URL *url_parse(const char *);
extern void url_free(struct URL *);
extern const char *url_get_filename(const struct URL *url);
extern const char *to_hex(unsigned int num,char *hexStr);

#endif //URL_H
